#!/bin/bash

VALUE_RAW=${1/0x/}
VALUE=$(echo ${VALUE_RAW} | tr [:lower:] [:upper:])
DEC=$(echo "ibase=16;$VALUE" | bc)
echo "HEX: 0x${VALUE_RAW}"
echo "DEC: ${DEC}"
